import axios from 'axios';
// 获取审核列表页表格数据
function getGridData (params) {
    return new Promise(resolve => {
        axios.post('/list', params).then(res => {
            const { list, total } = res?.data?.data;
            resolve({ list, total });
        })
    })
}

// 删除审核列表页表格数据
function deleteGridData (params) {
    return new Promise(resolve => {
        axios.post('/delete', params).then(res => {
            const { list, total } = res?.data?.data;
            resolve({ list, total });
        })
    })
}

// 获取审核详情页基础信息数据
function getBasicInfoData () {
    return new Promise(resolve => {
        axios.post('/info').then(res => {
            const { info } = res?.data?.data;
            resolve(info);
        })
    })
}

// 获取审核详情页表格数据
function getDetailGridData () {
    return new Promise(resolve => {
        axios.post('/detailgrid').then(res => {
            const { grid } = res?.data?.data;
            resolve(grid);
        })
    })
}

export {
    getGridData,
    deleteGridData,
    getBasicInfoData,
    getDetailGridData
}